﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace DFGK_WMS.Context.Migrations
{
    public partial class 徐州学校收货单新增字段 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<int>(
                name: "BillType",
                table: "TReceivingBills",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<DateTime>(
                name: "DocumentDate",
                table: "TReceivingBills",
                type: "datetime2",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));

            migrationBuilder.AddColumn<int>(
                name: "MoveType",
                table: "TReceivingBills",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "OrderSn",
                table: "TReceivingBills",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "PlanEndTime",
                table: "TReceivingBills",
                type: "datetime2",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));

            migrationBuilder.AddColumn<DateTime>(
                name: "PlanStartTime",
                table: "TReceivingBills",
                type: "datetime2",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));

            migrationBuilder.AddColumn<string>(
                name: "PompanyCode",
                table: "TReceivingBills",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "PompanyName",
                table: "TReceivingBills",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "PurOrderLineNo",
                table: "TReceivingBills",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<decimal>(
                name: "ReceivedQty",
                table: "TReceivingBills",
                type: "decimal(18,2)",
                nullable: false,
                defaultValue: 0m);

            migrationBuilder.AddColumn<string>(
                name: "SupplierCode",
                table: "TReceivingBills",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "TMaterialCode",
                table: "TReceivingBills",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "TMaterialName",
                table: "TReceivingBills",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "UnitCode",
                table: "TReceivingBills",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "UnitName",
                table: "TReceivingBills",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "BillType",
                table: "TReceivingBillDetails",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "CustomerCode",
                table: "TReceivingBillDetails",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "CustomerName",
                table: "TReceivingBillDetails",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "DocumentDate",
                table: "TReceivingBillDetails",
                type: "datetime2",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));

            migrationBuilder.AddColumn<DateTime>(
                name: "ExpectedTime",
                table: "TReceivingBillDetails",
                type: "datetime2",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));

            migrationBuilder.AddColumn<string>(
                name: "FactoryCode",
                table: "TReceivingBillDetails",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "FactoryName",
                table: "TReceivingBillDetails",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "FlowPathType",
                table: "TReceivingBillDetails",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "IineItem",
                table: "TReceivingBillDetails",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "ModelSpec",
                table: "TReceivingBillDetails",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "MoveType",
                table: "TReceivingBillDetails",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "OrderSn",
                table: "TReceivingBillDetails",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "PlanEndTime",
                table: "TReceivingBillDetails",
                type: "datetime2",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));

            migrationBuilder.AddColumn<DateTime>(
                name: "PlanStartTime",
                table: "TReceivingBillDetails",
                type: "datetime2",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));

            migrationBuilder.AddColumn<string>(
                name: "PompanyCode",
                table: "TReceivingBillDetails",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "PompanyName",
                table: "TReceivingBillDetails",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "ProductCode",
                table: "TReceivingBillDetails",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "ProductName",
                table: "TReceivingBillDetails",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "PurOrderLineNo",
                table: "TReceivingBillDetails",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "ReturnDateTime",
                table: "TReceivingBillDetails",
                type: "datetime2",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));

            migrationBuilder.AddColumn<string>(
                name: "SafeOrderSn",
                table: "TReceivingBillDetails",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "SaleIineItem",
                table: "TReceivingBillDetails",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "SupplierCode",
                table: "TReceivingBillDetails",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "TMaterialCode",
                table: "TReceivingBillDetails",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "TMaterialName",
                table: "TReceivingBillDetails",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "UnitCode",
                table: "TReceivingBillDetails",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "UnitName",
                table: "TReceivingBillDetails",
                type: "nvarchar(max)",
                nullable: true);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "BillType",
                table: "TReceivingBills");

            migrationBuilder.DropColumn(
                name: "DocumentDate",
                table: "TReceivingBills");

            migrationBuilder.DropColumn(
                name: "MoveType",
                table: "TReceivingBills");

            migrationBuilder.DropColumn(
                name: "OrderSn",
                table: "TReceivingBills");

            migrationBuilder.DropColumn(
                name: "PlanEndTime",
                table: "TReceivingBills");

            migrationBuilder.DropColumn(
                name: "PlanStartTime",
                table: "TReceivingBills");

            migrationBuilder.DropColumn(
                name: "PompanyCode",
                table: "TReceivingBills");

            migrationBuilder.DropColumn(
                name: "PompanyName",
                table: "TReceivingBills");

            migrationBuilder.DropColumn(
                name: "PurOrderLineNo",
                table: "TReceivingBills");

            migrationBuilder.DropColumn(
                name: "ReceivedQty",
                table: "TReceivingBills");

            migrationBuilder.DropColumn(
                name: "SupplierCode",
                table: "TReceivingBills");

            migrationBuilder.DropColumn(
                name: "TMaterialCode",
                table: "TReceivingBills");

            migrationBuilder.DropColumn(
                name: "TMaterialName",
                table: "TReceivingBills");

            migrationBuilder.DropColumn(
                name: "UnitCode",
                table: "TReceivingBills");

            migrationBuilder.DropColumn(
                name: "UnitName",
                table: "TReceivingBills");

            migrationBuilder.DropColumn(
                name: "BillType",
                table: "TReceivingBillDetails");

            migrationBuilder.DropColumn(
                name: "CustomerCode",
                table: "TReceivingBillDetails");

            migrationBuilder.DropColumn(
                name: "CustomerName",
                table: "TReceivingBillDetails");

            migrationBuilder.DropColumn(
                name: "DocumentDate",
                table: "TReceivingBillDetails");

            migrationBuilder.DropColumn(
                name: "ExpectedTime",
                table: "TReceivingBillDetails");

            migrationBuilder.DropColumn(
                name: "FactoryCode",
                table: "TReceivingBillDetails");

            migrationBuilder.DropColumn(
                name: "FactoryName",
                table: "TReceivingBillDetails");

            migrationBuilder.DropColumn(
                name: "FlowPathType",
                table: "TReceivingBillDetails");

            migrationBuilder.DropColumn(
                name: "IineItem",
                table: "TReceivingBillDetails");

            migrationBuilder.DropColumn(
                name: "ModelSpec",
                table: "TReceivingBillDetails");

            migrationBuilder.DropColumn(
                name: "MoveType",
                table: "TReceivingBillDetails");

            migrationBuilder.DropColumn(
                name: "OrderSn",
                table: "TReceivingBillDetails");

            migrationBuilder.DropColumn(
                name: "PlanEndTime",
                table: "TReceivingBillDetails");

            migrationBuilder.DropColumn(
                name: "PlanStartTime",
                table: "TReceivingBillDetails");

            migrationBuilder.DropColumn(
                name: "PompanyCode",
                table: "TReceivingBillDetails");

            migrationBuilder.DropColumn(
                name: "PompanyName",
                table: "TReceivingBillDetails");

            migrationBuilder.DropColumn(
                name: "ProductCode",
                table: "TReceivingBillDetails");

            migrationBuilder.DropColumn(
                name: "ProductName",
                table: "TReceivingBillDetails");

            migrationBuilder.DropColumn(
                name: "PurOrderLineNo",
                table: "TReceivingBillDetails");

            migrationBuilder.DropColumn(
                name: "ReturnDateTime",
                table: "TReceivingBillDetails");

            migrationBuilder.DropColumn(
                name: "SafeOrderSn",
                table: "TReceivingBillDetails");

            migrationBuilder.DropColumn(
                name: "SaleIineItem",
                table: "TReceivingBillDetails");

            migrationBuilder.DropColumn(
                name: "SupplierCode",
                table: "TReceivingBillDetails");

            migrationBuilder.DropColumn(
                name: "TMaterialCode",
                table: "TReceivingBillDetails");

            migrationBuilder.DropColumn(
                name: "TMaterialName",
                table: "TReceivingBillDetails");

            migrationBuilder.DropColumn(
                name: "UnitCode",
                table: "TReceivingBillDetails");

            migrationBuilder.DropColumn(
                name: "UnitName",
                table: "TReceivingBillDetails");
        }
    }
}
